import Vue from 'vue'
import VueRouter from 'vue-router'
import One from "@/views/One";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/one',
    name: 'suibian',
    component: One
  },
  {
    path: '/two',
    name: 'two',
    component: () => import('@/views/Two.vue')
  },
    {
      // 请求地址：/three/1/2
      // path:"/three/:a/:b",
      path: '/three/:a/:b.html',
      name: 'three',
      component: () => import('@/views/Three.vue')
    },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
  linkActiveClass: 'active'
})

export default router
